package com.rmy.queue.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rmy.queue.mapper.QmsErpRuleMapper;
import com.rmy.queue.domain.QmsErpRule;
import com.rmy.queue.service.IQmsErpRuleService;

/**
 * 队列规则Service业务层处理
 * 
 * @author rmy
 * @date 2022-09-30
 */
@Service
public class QmsErpRuleServiceImpl implements IQmsErpRuleService 
{
    @Autowired
    private QmsErpRuleMapper qmsErpRuleMapper;

    /**
     * 查询队列规则
     * 
     * @param businessId 队列规则主键
     * @return 队列规则
     */
    @Override
    public QmsErpRule selectQmsErpRuleByBusinessId(Long businessId)
    {
        return qmsErpRuleMapper.selectQmsErpRuleByBusinessId(businessId);
    }

    /**
     * 查询队列规则列表
     * 
     * @param qmsErpRule 队列规则
     * @return 队列规则
     */
    @Override
    public List<QmsErpRule> selectQmsErpRuleList(QmsErpRule qmsErpRule)
    {
        return qmsErpRuleMapper.selectQmsErpRuleList(qmsErpRule);
    }

    /**
     * 新增队列规则
     * 
     * @param qmsErpRule 队列规则
     * @return 结果
     */
    @Override
    public int insertQmsErpRule(QmsErpRule qmsErpRule)
    {
        return qmsErpRuleMapper.insertQmsErpRule(qmsErpRule);
    }

    /**
     * 修改队列规则
     * 
     * @param qmsErpRule 队列规则
     * @return 结果
     */
    @Override
    public int updateQmsErpRule(QmsErpRule qmsErpRule)
    {
        return qmsErpRuleMapper.updateQmsErpRule(qmsErpRule);
    }

    /**
     * 批量删除队列规则
     * 
     * @param businessIds 需要删除的队列规则主键
     * @return 结果
     */
    @Override
    public int deleteQmsErpRuleByBusinessIds(Long[] businessIds)
    {
        return qmsErpRuleMapper.deleteQmsErpRuleByBusinessIds(businessIds);
    }

    /**
     * 删除队列规则信息
     * 
     * @param businessId 队列规则主键
     * @return 结果
     */
    @Override
    public int deleteQmsErpRuleByBusinessId(Long businessId)
    {
        return qmsErpRuleMapper.deleteQmsErpRuleByBusinessId(businessId);
    }
}
